<template>
  <div class="goods">
    <h3>商品名称：{{ pname }}</h3>
    <p>商品单价：{{ price }}</p>
    <p>商品介绍：{{ info }}</p>
  </div>
</template>

<script>
export default {
  props: {
    id: {
      required: true,
      type: Number
    },
    pname: {
      default: '方便面'
    },
    price: Number,
    info: {
      default: '非常好吃，好点甜'
    }
  }
}
</script>

<style>
  .goods {
    padding: 10px;
    margin: 8px;
    border: 3px solid #000;
    min-height: 50px;
  }
</style>